﻿using Nemerle.Collections;
using Nemerle.Text;
using Nemerle.Utility;

using System;
using System.Collections.Generic;
using System.Linq;
using Nemerle.Peg;

namespace Nemerle2.Compiler
{
  /// <summary>
  /// Represent some string in code.
  /// </summary>
  [Record]
  public class PId : PAst
  {
    public this(location : Location, project : NProject) { base(location, project) }

    public Text : string
    {
      mutable _text : string;
      get
      {
        when (_text == null)
          _text = this.Location.GetText();

        _text
      }
    }

    public override ToString() : string
    {
      Text
    }
  }
}
